package demo5;

import java.util.ArrayList;
import java.util.List;

// 食堂分类
class CanteenCategory {
    private int categoryId;
    private String categoryName;
    private String categoryDescription;
    private boolean isDisabled;

    public CanteenCategory(int categoryId, String categoryName, String categoryDescription) {
        this.categoryId = categoryId;
        this.categoryName = categoryName;
        this.categoryDescription = categoryDescription;
        this.isDisabled = false;
    }

    // 添加分类（可在构造函数完成，此方法可根据实际扩展）
    public void addCategory() {
        // 可添加具体逻辑
    }

    // 修改分类
    public void modifyCategory(String categoryName, String categoryDescription, boolean isDisabled) {
        this.categoryName = categoryName;
        this.categoryDescription = categoryDescription;
        this.isDisabled = isDisabled;
    }

    // 删除分类（可通过标记停用实现）
    public void deleteCategory() {
        this.isDisabled = true;
    }

    // 查询分类
    public String getCategoryInfo() {
        return "Category ID: " + categoryId + ", Category Name: " + categoryName +
                ", Description: " + categoryDescription + ", Status: " + (isDisabled ? "Disabled" : "Active");
    }

    // Getters 和 Setters
    public int getCategoryId() {
        return categoryId;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public String getCategoryDescription() {
        return categoryDescription;
    }

    public boolean isDisabled() {
        return isDisabled;
    }
}
